package com.shujia.source

import org.apache.flink.streaming.api.scala._

object Demo3SocketSource {
  def main(args: Array[String]): Unit = {
    val env: StreamExecutionEnvironment = StreamExecutionEnvironment.getExecutionEnvironment

    /**
      * 读取socket -- 无界流
      *
      */
    val ds: DataStream[String] = env.socketTextStream("master",8888)

    ds.print()

    env.execute()


  }

}
